<?php /* Smarty version Smarty-3.1.19, created on 2017-11-08 15:59:39
         compiled from "/www/wwwroot/kq.nabaowan.cn/sdk/theme/admin/default/views/notice/index.html" */ ?>
<?php /*%%SmartyHeaderCode:13729339925a02b96befd785-76822759%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'e15c20b2bad303facd665243a6aeb5777375f99e' => 
    array (
      0 => '/www/wwwroot/kq.nabaowan.cn/sdk/theme/admin/default/views/notice/index.html',
      1 => 1508923774,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '13729339925a02b96befd785-76822759',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'list' => 0,
    'v' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.19',
  'unifunc' => 'content_5a02b96bf35c25_53255605',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5a02b96bf35c25_53255605')) {function content_5a02b96bf35c25_53255605($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('public/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
  

  <div class="main-content">
    <div class="page-content">
      <div class="page-content-area" style="opacity: 0.8;"> <br>
        <div class="page-header">
          <h1> 通知公告 <small><i class="ace-icon fa fa-angle-double-right"></i> 通知列表 </small> </h1>
        </div>
        <div class="row">
          <div class="col-xs-12">
             <form method="post" class="form-horizontal" role="form" id="submitform" onsubmit="return false">
              <table class="table table-bordered table-hover">
                <thead>
                  <tr>
                    <th>ID</th>
                    <th>标题</th>
                    <th>时间</th>
                    <th>操作</th>
                  </tr>
                </thead>
                <tbody>
                <?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_fromtemp = $_smarty_tpl->tpl_vars['list']->value['data']; $_from = $_smarty_tpl->tpl_vars['list']->value['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if($_fromtemp)foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value) {
$_smarty_tpl->tpl_vars['v']->_loop = true;
?>
                  <tr>
                    <td><input type="checkbox" name="id[]" value="<?php echo $_smarty_tpl->tpl_vars['v']->value['id'];?>
"/>
                      <?php echo $_smarty_tpl->tpl_vars['v']->value['id'];?>
</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['v']->value['info'];?>
</td>
                    <td><?php echo $_smarty_tpl->tpl_vars['v']->value['add_time'];?>
</td>
                    <td><a href="<?php echo siteurl('con=admin/notice/edit');?>
&id=<?php echo $_smarty_tpl->tpl_vars['v']->value['id'];?>
">编辑</a></td>
                </tr>
                <?php } ?>
                <tr>
                    <td colspan="7"><input type="checkbox" onclick="var ck = this.checked;$('input[name=&quot;id[]&quot;]').each(function(){ this.checked = ck });">
                      <a class="btn btn-default btn-delete">删除</a>
                      <a class="btn btn-success" href="<?php echo siteurl('con=admin/notice/edit');?>
">+ 新增通知</a></td>
                  </tr>
                </tbody>
              </table>
              <table style="width:100%;" class="listpage">
                <tr>
                  <td><?php echo showpage($_smarty_tpl->tpl_vars['list']->value['page']);?>
</td>
                </tr>
              </table>
             </form>
          </div>
        </div>
    </div>
  </div>
  
<script>
$(function(){
	$('.btn-delete').click(function(){
		var ckvals = $.selectCK('input[name="id[]"]');
		if(!ckvals){
			tooltipbox.show('请选择要操作的数据');
			return false;
		}
		tooltipbox.confirm('确定永久删除选中的数据？', function(data){
			tooltipbox.show('正在执行操作...');
			$.post('<?php echo siteurl("con=admin/notice/delete");?>
', data, function(res){
				if(res.code == 1){
					location.reload();
				}
				tooltipbox.show(res.msg);
			}, 'json').error(function(){
				tooltipbox.show('数据或网络错误');
			});
		}, false, { 'ids': ckvals });
	});
});
</script>  
<?php echo $_smarty_tpl->getSubTemplate ('public/footer.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
  <?php }} ?>
